package cn.edu.lingnan.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloController implements Controller {
    @Override
    public ModelAndView handleRequest
            (HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
            throws Exception {
        ModelAndView mv = new ModelAndView();
        //中间这里应该调用系统的业务逻辑，也就是调用service层----------------------------------------
        mv.addObject("msg","hello myFirst SpringMVC");
        mv.setViewName("hello");
        return mv;
    }
}
